package beans;

import java.math.BigDecimal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "express")
public class Express {
	private int expressId;
	private int status;
	private int payway;// 付款形式
	private String expressName;
	private String expressProvince;
	private String expressCity;
	private String expressAddr;
	private BigDecimal expressBalance;
	private BigDecimal overdue;// 欠费额度
	private BigDecimal cost;// 单件扣费
	private Company company;
	private Agent agent;
	private Courier courier;
	private String hotLine;
	private String getCode;

	@GenericGenerator(name = "generator", strategy = "native")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "express_id", unique = true, nullable = false)
	public int getExpressId() {
		return expressId;
	}

	public void setExpressId(int expressId) {
		this.expressId = expressId;
	}

	@Column(name = "express_name")
	public String getExpressName() {
		return expressName;
	}

	public void setExpressName(String expressName) {
		this.expressName = expressName;
	}

	@Column(name = "express_province")
	public String getExpressProvince() {
		return expressProvince;
	}

	public void setExpressProvince(String expressProvince) {
		this.expressProvince = expressProvince;
	}

	@Column(name = "express_city")
	public String getExpressCity() {
		return expressCity;
	}

	public void setExpressCity(String expressCity) {
		this.expressCity = expressCity;
	}

	@Column(name = "express_addr")
	public String getExpressAddr() {
		return expressAddr;
	}

	public void setExpressAddr(String expressAddr) {
		this.expressAddr = expressAddr;
	}

	@Column(name = "express_status")
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@Column(name = "express_payway")
	public int getPayway() {
		return payway;
	}

	public void setPayway(int payway) {
		this.payway = payway;
	}

	@Column(name = "express_balance")
	public BigDecimal getExpressBalance() {
		return expressBalance;
	}

	public void setExpressBalance(BigDecimal expressBalance) {
		this.expressBalance = expressBalance;
	}

	@Column(name = "express_overdue_balance")
	public BigDecimal getOverdue() {
		return overdue;
	}

	public void setOverdue(BigDecimal overdue) {
		this.overdue = overdue;
	}

	@Column(name = "express_cost")
	public BigDecimal getCost() {
		return cost;
	}

	public void setCost(BigDecimal cost) {
		this.cost = cost;
	}

	@ManyToOne
	@JoinColumn(name = "express_company_id")
	public Company getCompany() {
		return company;
	}

	public void setCompany(Company company) {
		this.company = company;
	}

	@ManyToOne
	@JoinColumn(name = "express_agent_id")
	public Agent getAgent() {
		return agent;
	}

	public void setAgent(Agent agent) {
		this.agent = agent;
	}

	@ManyToOne
	@JoinColumn(name = "express_courier_id")
	public Courier getCourier() {
		return courier;
	}

	public void setCourier(Courier courier) {
		this.courier = courier;
	}

	@Column(name = "express_hotLine")
	public String getHotLine() {
		return hotLine;
	}

	public void setHotLine(String hotLine) {
		this.hotLine = hotLine;
	}

	@Column(name = "express_getCode")
	public String getGetCode() {
		return getCode;
	}

	public void setGetCode(String getCode) {
		this.getCode = getCode;
	}

}
